export default [
  // 权限路由
  {
    path: '/',
    redirect: '/service',
    hidden: true // 是否展示在侧边栏的菜单里
  },
  //  服务管理
  {
    path: '/service',
    component: 'Layout',
    redirect: '/service/list',
    meta: {
      menuName: 'Service',
      icon: 'icon-yuyue',
      subNavName: [{
        name: 'ServiceManage',
        url: [{
          name: 'ServiceManage',
          url: '/service/list'
        }]
      }, {
        name: 'ServiceSet',
        url: [{
          name: 'ServiceBannerList',
          url: '/service/banner'
        }]
      }]
    },
    children: [{
      path: 'list',
      name: 'ServiceManage',
      component: '/service/service/list',
      meta: {
        keepAlive: true,
        title: 'ServiceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ServiceManage',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'service/edit',
      name: 'ServiceEdit',
      component: '/service/service/edit',
      meta: {
        keepAlive: false,
        title: 'ServiceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ServiceEdit',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'banner',
      name: 'ServiceBannerList',
      component: '/service/set/list',
      meta: {
        keepAlive: true,
        title: 'ServiceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ServiceBannerList',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'banner/edit',
      name: 'ServiceBannerEdit',
      component: '/service/set/edit',
      meta: {
        keepAlive: false,
        title: 'ServiceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ServiceBannerEdit',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  //  技师管理
  {
    path: '/technician',
    component: 'Layout',
    redirect: '/technician/list',
    meta: {
      menuName: 'Technician',
      icon: 'icon-jishi',
      subNavName: [{
        name: 'TechnicianManage',
        url: [{
          name: 'TechnicianManage',
          url: '/technician/list'
        }, {
          name: 'TechnicianLevel',
          url: '/technician/level'
        }]
      }]
    },
    children: [{
      path: 'list',
      name: 'TechnicianManage',
      component: '/technician/list',
      meta: {
        keepAlive: true,
        title: 'TechnicianManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'TechnicianManage',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'edit',
      name: 'TechnicianEdit',
      component: '/technician/edit',
      meta: {
        keepAlive: false,
        title: 'TechnicianManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'TechnicianEdit',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'level',
      name: 'TechnicianLevel',
      component: '/technician/level',
      meta: {
        keepAlive: true,
        title: 'TechnicianManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'TechnicianLevel',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  //  营销管理
  {
    path: '/market',
    component: 'Layout',
    redirect: '/market/list',
    meta: {
      menuName: 'Market',
      icon: 'icon-yingxiao',
      subNavName: [{
        name: 'MarketManage',
        url: [{
          name: 'MarketCoupon',
          url: '/market/list'
        }, {
          name: 'MarketAtv',
          url: '/market/atv'
        }]
      }]
    },
    children: [{
      path: 'list',
      name: 'MarketCoupon',
      component: '/market/list',
      meta: {
        keepAlive: true,
        title: 'MarketManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'MarketCoupon',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'edit',
      name: 'MarketCouponEdit',
      component: '/market/edit',
      meta: {
        keepAlive: false,
        title: 'MarketManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'MarketCouponEdit',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'atv',
      name: 'MarketAtv',
      component: '/market/atv',
      meta: {
        keepAlive: true,
        title: 'MarketManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'MarketAtv',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  //  订单管理
  {
    path: '/shop',
    component: 'Layout',
    redirect: '/shop/order',
    meta: {
      menuName: 'Shop',
      icon: 'icon-dingdanguanli',
      subNavName: [{
        name: 'ShopOrderManage',
        url: [{
          name: 'ShopOrder',
          url: '/shop/order'
        },
        {
          name: 'ShopRefund',
          url: '/shop/refund'
        }]
      }, {
        name: 'ShopEvaluate',
        url: [{
          name: 'ShopEvaluateLabel',
          url: '/shop/evaluate/label'
        },
        {
          name: 'ShopEvaluate',
          url: '/shop/evaluate/list'
        }]
      }, {
        name: 'ShopCommission',
        url: [{
          name: 'ShopCommissiondistribution',
          url: '/shop/commission/distribution'
        }]
      }]
    },
    children: [{
      path: 'order',
      name: 'ShopOrder',
      component: '/shop/order/list',
      meta: {
        keepAlive: true,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopOrder',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'order/detail',
      name: 'ShopOrderDetail',
      component: '/shop/order/detail',
      meta: {
        keepAlive: false,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopOrderDetail',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'refund',
      name: 'ShopRefund',
      component: '/shop/refund/list',
      meta: {
        keepAlive: true,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopRefund',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'refund/detail',
      name: 'ShopRefundDetail',
      component: '/shop/refund/detail',
      meta: {
        keepAlive: false,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopRefundDetail',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'evaluate/label',
      name: 'ShopEvaluateLabel',
      component: '/shop/evaluate/label',
      meta: {
        keepAlive: true,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopEvaluateLabel',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'evaluate/list',
      name: 'ShopEvaluate',
      component: '/shop/evaluate/list',
      meta: {
        keepAlive: true,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopEvaluate',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'commission/distribution',
      name: 'ShopCommissiondistribution',
      component: '/shop/commission/distribution',
      meta: {
        keepAlive: true,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopCommissiondistribution',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  //  分销管理
  {
    path: '/distribution',
    component: 'Layout',
    redirect: '/distribution/examine',
    meta: {
      menuName: 'Distribution',
      icon: 'icon-shenhe',
      subNavName: [{
        name: 'DistributionManage',
        url: [{
          name: 'DistributionExamine',
          url: '/distribution/examine'
        }, {
          name: 'DistributionSet',
          url: '/distribution/set'
        }]
      }]
    },
    children: [{
      path: 'examine',
      name: 'DistributionExamine',
      component: '/distribution/examine',
      meta: {
        keepAlive: true,
        title: 'DistributionManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'DistributionExamine',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'set',
      name: 'DistributionSet',
      component: '/distribution/set',
      meta: {
        keepAlive: true,
        title: 'DistributionManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'DistributionSet',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  //  渠道商管理
  {
    path: '/channel',
    component: 'Layout',
    redirect: '/channel/examine',
    meta: {
      menuName: 'Channel',
      icon: 'icon-zuzhi',
      subNavName: [{
        name: 'ChannelManage',
        url: [{
          name: 'ChannelExamine',
          url: '/channel/examine'
        }, {
          name: 'ChannelClassify',
          url: '/channel/classify'
        }, {
          name: 'ChannelFinance',
          url: '/channel/finance'
        }]
      }]
    },
    children: [{
      path: 'examine',
      name: 'ChannelExamine',
      component: '/channel/examine',
      meta: {
        keepAlive: true,
        title: 'ChannelManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ChannelExamine',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'classify',
      name: 'ChannelClassify',
      component: '/channel/classify',
      meta: {
        keepAlive: true,
        title: 'ChannelManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ChannelClassify',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'finance',
      name: 'ChannelFinanceManage',
      component: '/channel/finance',
      meta: {
        keepAlive: true,
        title: 'ChannelManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ChannelFinanceManage',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  //  财务管理
  {
    path: '/finance',
    component: 'Layout',
    redirect: '/finance/stored/list',
    meta: {
      menuName: 'Finance',
      icon: 'icon-caiwu',
      subNavName: [{
        name: 'FinanceStored',
        url: [{
          name: 'FinanceStored',
          url: '/finance/stored/list'
        }, {
          name: 'FinanceStoredOrder',
          url: '/finance/stored/order'
        }]
      }, {
        name: 'FinanceManage',
        url: [{
          name: 'FinanceManage',
          url: '/finance/list'
        }, {
          name: 'FinanceRecord',
          url: '/finance/record'
        }]
      }]
    },
    children: [{
      path: 'stored/list',
      name: 'FinanceStored',
      component: '/finance/stored/list',
      meta: {
        keepAlive: true,
        title: 'FinanceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'FinanceStored',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'stored/order',
      name: 'FinanceStoredOrder',
      component: '/finance/stored/order',
      meta: {
        keepAlive: true,
        title: 'FinanceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'FinanceStoredOrder',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'list',
      name: 'FinanceManage',
      component: '/finance/finance/list',
      meta: {
        keepAlive: true,
        title: 'FinanceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'FinanceManage',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'detail',
      name: 'FinanceDetail',
      component: '/finance/finance/detail',
      meta: {
        keepAlive: false,
        title: 'FinanceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'FinanceDetail',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'record',
      name: 'FinanceRecord',
      component: '/finance/finance/record',
      meta: {
        keepAlive: false,
        title: 'FinanceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'FinanceRecord',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'record2',
      name: 'FinanceRecord',
      component: '/finance/finance/record2',
      meta: {
        keepAlive: false,
        title: 'FinanceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'FinanceRecord',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'fare',
      name: 'FinanceFareRecord',
      component: '/finance/finance/fare',
      meta: {
        keepAlive: false,
        title: 'FinanceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'FinanceFareRecord',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  //  客户管理
  {
    path: '/custom',
    component: 'Layout',
    redirect: '/custom/list',
    meta: {
      menuName: 'Custom',
      icon: 'icon-account-line'
    },
    children: [{
      path: 'list',
      name: 'CustomManage',
      component: '/custom/list',
      meta: {
        keepAlive: true,
        title: '',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'CustomManage',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  //  求救通知
  {
    path: '/notice',
    component: 'Layout',
    redirect: '/notice/list',
    meta: {
      menuName: 'Notice',
      icon: 'icon-tongzhi'
    },
    children: [{
      path: 'list',
      name: 'Notice',
      component: '/notice/list',
      meta: {
        keepAlive: true,
        title: '',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'NoticeManage',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  //  订单通知
  {
    path: '/order',
    component: 'Layout',
    redirect: '/order/notice',
    isHidden: true,
    meta: {
      menuName: 'ShopOrderNotice',
      icon: 'icon-tongzhi'
    },
    children: [{
      path: 'notice',
      name: 'ShopOrderNotice',
      component: '/shop/notice',
      meta: {
        keepAlive: true,
        title: '',
        auth: [],
        isOnly: true,
        pagePermission: [{
          title: 'ShopOrderNotice',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  // 账号
  {
    path: '/account',
    component: 'Layout',
    redirect: '/account/franchisee',
    meta: {
      menuName: 'account',
      icon: 'icon-person-accounts',
      subNavName: [{
        name: 'accountFranchiseeName',
        url: [{
          name: 'franchiseeTitle',
          url: '/account/franchisee'
        }]
      }]
    },
    children: [{
      path: 'franchisee',
      name: 'franchiseeTitle',
      component: '/account/franchisee/index',
      meta: {
        keepAlive: true,
        title: 'franchiseeTitle',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'franchiseeTitle',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  // diy
  {
    path: '/diy',
    component: 'Layout',
    redirect: '/diy/color',
    meta: {
      menuName: 'Diy',
      icon: 'icon-chaifenyemian',
      subNavName: [{
        name: 'DiyManage',
        url: [{
          name: 'DiyColor',
          url: '/diy/color'
        }, {
          name: 'DiySet',
          url: '/diy/set'
        }]
      }]
    },
    children: [{
      path: 'color',
      name: 'DiyColor',
      component: '/diy/color',
      meta: {
        keepAlive: true,
        title: 'DiyManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'DiyColor',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'set',
      name: 'DiySet',
      component: '/diy/set',
      meta: {
        keepAlive: true,
        title: 'DiyManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'DiySet',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  // 系统
  {
    path: '/sys',
    component: 'Layout',
    redirect: '/sys/upgrade',
    meta: {
      menuName: 'System',
      icon: 'icon-xitong',
      subNavName: [{
        name: 'SystemVersion',
        url: [{
          name: 'SystemUpgrade',
          url: '/sys/upgrade'
        }, {
          name: 'SystemExamine',
          url: '/sys/examine'
        }]
      }, {
        name: 'SystemSetting',
        url: [{
          name: 'SystemWechat',
          url: '/sys/wechat'
        },
        {
          name: 'SystemWeb',
          url: '/sys/web'
        },
        {
          name: 'SystemApp',
          url: '/sys/app'
        },
        {
          name: 'SystemInfo',
          url: '/sys/info'
        },
        {
          name: 'SystemPayment',
          url: '/sys/payment'
        },
        {
          name: 'SystemUpload',
          url: '/sys/upload'
        },
        {
          name: 'SystemTransaction',
          url: '/sys/transaction'
        },
        {
          name: 'SystemAllNotice',
          url: '/sys/notice'
        },
        {
          name: 'SystemMessage',
          url: '/sys/message'
        },
        {
          name: 'SystemInformation',
          url: '/sys/information'
        }
        ]
      }, {
        name: 'SystemOther',
        url: [{
          name: 'SystemPrint',
          url: '/sys/print'
        },
        {
          name: 'SystemCarFee',
          url: '/sys/car_fee'
        },
        {
          name: 'SystemCity',
          url: '/sys/city'
        },
        {
          name: 'SystemTravel',
          url: '/sys/travel'
        },
        {
          name: 'SystemOther',
          url: '/sys/other'
        }
        ]
      }]
    },
    children: [{
      path: 'upgrade',
      name: 'SystemUpgrade',
      component: '/system/upgrade',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemUpgrade',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'examine',
      name: 'SystemExamine',
      component: '/system/examine',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemExamine',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'wechat',
      name: 'SystemWechat',
      component: '/system/wechat',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemWechat',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'web',
      name: 'SystemWeb',
      component: '/system/web',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemWeb',
          index: 0,
          auth: ['view']
        }]
      }
    },
    {
      path: 'app',
      name: 'SystemApp',
      component: '/system/app',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemApp',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'info',
      name: 'SystemInfo',
      component: '/system/info',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemInfo',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'payment',
      name: 'SystemPayment',
      component: '/system/payment',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        isOnly: false,
        auth: [],
        pagePermission: [{
          title: 'SystemPayment',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'upload',
      name: 'SystemUpload',
      component: '/system/upload',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemUpload',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'transaction',
      name: 'SystemTransaction',
      component: '/system/transaction',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemTransaction',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'travel',
      name: 'SystemTravel',
      component: '/system/travel',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemTravel',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'notice',
      name: 'SystemAllNotice',
      component: '/system/notice',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemAllNotice',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'message',
      name: 'SystemMessage',
      component: '/system/message',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemMessage',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'information',
      name: 'SystemInformation',
      component: '/system/information',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemInformation',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'print',
      name: 'SystemPrintSet',
      component: '/system/print',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemPrintSet',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'car_fee',
      name: 'SystemCarFee',
      component: '/system/car_fee',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemCarFee',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'city',
      name: 'SystemCity',
      component: '/system/city',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemCity',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'other',
      name: 'SystemOther',
      component: '/system/other',
      meta: {
        keepAlive: true,
        title: 'SystemSetting',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'SystemOther',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  {
    path: '*',
    redirect: '/404',
    hidden: true
  }
]
